\documentclass[12pt]{article}

\usepackage{graphicx} 
\usepackage{amssymb}
\usepackage{epstopdf}
\usepackage{array}
\usepackage{fancyhdr}
\usepackage{color}
\pagestyle{fancy}
\fancyhead{}
\renewcommand{\headrulewidth}{0pt}
\pagestyle{empty}
 
\textwidth = 6.6 in
\textheight = 9 in
\oddsidemargin = 0.0 in
\evensidemargin = 0.0 in
\topmargin = 0.0 in
\headheight = 0.0 in
\headsep = 0.0 in
\parskip = 0.08 in
\parindent = 0.0 in

\bibliographystyle{unsrt}

%\parskip .1cm

% Proposals must have 2.5 cm margins at the top, bottom, and on each side.
% 'average' type density must be no more than 15 characters per 2.5 cm.
% no more than 6 lines within a vertical space of 2.5 cm.
%\oddsidemargin -0.04cm
%\evensidemargin -0.04cm
%\topmargin -0.5cm
%\textheight22.9cm
%\textwidth 16.59cm
%\voffset=-1cm

\def\journaldata#1#2#3#4{{\it #1} {\bf #2:} #3 (#4)}
 %
 % Usage is {journal name} {volume} {pages} {year}
 % (volume can also be {volume and issue number})

\def\eprint#1{$\langle$#1\hbox{$\rangle$}}


\begin{document}

\begin{center}
{\bf Ubiquitous Installation of Applications, Libraries, and Resources (UBIQIS)}
\end{center}

authors: Steven Brandt, Matthew Eastman

\hrulefill

\section{Abstract}% - 1 page max

We propose a system for ubiquitous installation of software resources by mapping resource names uniquely to URLs, fetching them securely on demand (file access), and storing them on a special read-only file system. Compiler wrappers are provided to give the appearance of a seamless universal install. Prototype implementations are available for Java, Python, and C++ on Linux, Mac OS X. Versions of software resources can be accessed directly, or via the ``latest'' version.

\section{Introduction}

One of the challenges of compiling and installing software is the heterogeneity of individual systems. Different libraries and different versions of those libraries are available on different systems on different paths. Typically environment variables, such as CLASSPATH, PYTHONPATH, and LD\_LIBRARY\_PATH, are used to facilitate the search of these places in the proper order -- and issues relating to their configuration can produce significant confusion.

This problem is compounded during the compilation phase when libraries and include paths must be specified for each component of a system. A practice of generating wrappers to the C compiler which do nothing more than provide directions on linking and including have become commonplace. 

For grid computing or Condor jobs the pain caused by this heterogeneity is particularly acute. In order to run anywhere these users must frequently bring copies of all relevant libraries with them -- possibly including makefiles and workarounds.

Our system, if widely implemented, would alleviate many of these problems as it would result uniquely named packages that have a standard location the file system of each given machine. The CLASSPATH, PYTHONPATH, or LD\_LIBRARY\_PATH need only contain this single element.

The core of the idea is simple. It requires only two elements:

\begin{itemize}
\item A package naming convention that uniquely translates a resource name into an URL and vice versa.
\item A virtual file system that is capable of downloading and installing and presenting packages to the user on demand.
\end{itemize}

The realization of the concept includes a few ancillary elements:
\begin{itemize}
\item A per package meta data file to be distributed by the package creator. This file ends with a ``.ubiq'' suffix and enables downloads from alternate sources.
\item The ubiqis user is provided to manage the root directory of package installs, minimizing the number of amount of network traffic generated and disk space used.
\item An optional system for creating registrars, allowing ``.ubiq'' files to migrate of their original host servers and create redundancy and ensuring that the package does not change.
\end{itemize}

\section{The Naming Convention}

To convert an URL to a resource name apply the following steps:
\begin{itemize}
\item Start with the host name, and reverse the dot separated elements. Thus,
www.cct.lsu.edu becomes edu.lsu.cct.www.
\item If a particular port is to be used, add the element \_p\{num\}. So if we want to offer the package on port 999 then we say, edu.lsu.cct.www.\_p999
\item To signal the transition between the host name and the directory names which are to follow, use the special name ubiqis\{num\}, where num is the number of significant names to follow the host. Each directory name then becomes a component of the path. Thus http://www.cct.lsu.edu:999/foo/bar/zoom.ubiqis becomes edu.lsu.cct.www.\_p999.ubiqis3.foo.bar.zoom.
\item The following special encodings are used,
\begin{enumerate}
\item $\_ \rightarrow \_\_$
\item $\_d \rightarrow -$
\item $\_t \rightarrow \sim$ 
\item $\_HH \rightarrow $ the character represent by hex digits HH.
\end{enumerate}
\end{itemize}
Examples:
\begin{itemize}
\item edu.lsu.cct.www.ubiqis2.foo.bar $\rightarrow$ http://www.cct.lsu.edu/foo/bar.ubiqis
\item com.somecompany.ubiqis3.\_tbrandt.z.y $\rightarrow$ http://somecompany.com/$\sim$sbrandt/z/y.ubiqis
\item edu.lsu.\_p9999.ubiqis1.u $\rightarrow$ http://lsu.edu:9999/u.ubiqis
\end{itemize}

\section{The Virtual File System}

The system we have chosen for our prototype is based on fuse. There are ports of fuse available for Mac and BSD. Plans are made to create prototypes for IFS (Windows), and VFS (AIX). The file system necessarily caches all requests so that the network is not queried unless necessary.

\section{Ubimake}

The distributor of an Ubiqis package may be structured to build on demand. The package should contain a "src" directory, as well as a single directory with one of the following names: "shlib", "lib", "bin". If the directory name is "shlib" a shared library will be built. If the name is "lib", a static library will be built. If a "bin" directory is present, an executable will be generated.

The stripped down build system is necessary for security reasons (we do not want arbitrary code to run as the ubiqis user). It is also desirable because builds need to be quick in order to minimize user waits.

\section{Comparisons}

To get a feel for the value of the system we are proposing we offer a comparison with other applications used for source distribution:
\begin{itemize}
\item Maven: Of all the software projects that we will consider, Maven is the most similar. It manages the build of software packages (primarily java based). It gets them on demand and caches them for later use.

Maven differs from our system in that it requires a central registry to find the packages, and that the packages are not identified a special naming system that is need not map uniquely to the package name. Maven is a compilation system, not a runtime system, and so it builds complete static resources. Ubiqis allows for multiple packages with a common dependency to transparently share and use the same dependent installations.

%\item Gentoo -- Source based distribution system.
\item Webstart -- 
Webstart can download, install, and run all relevant code for a given application from a single URL. It also provides enforcement of the version of the executing virtual machine (which Ubiqis does not do).

Webstart, however, must get all the code for a single application from a single place and cannot share dependencies. Possibly the biggest real difference is that Webstart is targeting applications and not library installations.

One of the interesting points, however, is that Webstart can work synergisticly with Ubiqis, triggering Ubiqis installs as it attempts to load class files.
%\item CPAN -- Requires installation of libraries be performed by an admin (usually). By contrast, Ubiqis will install libraries as needed by the running application and without need of administrator intervention.
%\item Perl/Pear
%\item Pacman
%\item Source Mage
%\item Ports/Portage
%\item Canary
%\item The Handle System (http://www.handle.net/): 
%This system provides a global persistance of data in arbitrary locations. We kind of do that too. Say something more intelligent.
\end{itemize}

\section{Security and Registrars}

\section{Issues/Features}

\begin{itemize}
\item Selling resources distributed via Ubiqis?
\end{itemize}

\section{Languages/Libs}
\subsection{C++}

\subsection{Java}

\subsection{Python}

\subsection{Perl}

\section{Future Work}

\begin{itemize}
\item SCM systems as backends (CVS, SVN, etc.) - The Maven project has a URL scheme for SCM systems (http://maven.apache.org/scm/scm-url-format.html)
\end{itemize}

\end{document}
